-- GENERATED SPELL FOR [Guardian of the Falcon] --


function spell0_22994(pUnit, Event) --@Hex,n/a--
pUnit:FullCastSpellOnTarget(40400,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22994', 4322, 1)
end

function spell1_22994(pUnit, Event) --@Mark of Anzu,n/a--
pUnit:FullCastSpellOnTarget(40366,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22994', 30284, 1)
end

function spell2_22994(pUnit, Event) --@Nether Vortex,n/a--
pUnit:FullCastSpellOnTarget(40368,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22994', 3500, 1)
end

function spell3_22994(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22994', 3000, 1)
end

function spell4_22994(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(32712,pUnit)
pUnit:RegisterEvent('Sorts_22994', 606, 1)
end

function spell5_22994(pUnit, Event) --@Twisting Blast,n/a--
pUnit:FullCastSpellOnTarget(40367,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22994', 3500, 1)
end

function Sorts_22994(pUnit, Event)
local choix_sorts_22994 = math.random(0, 5)
if choix_sorts_22994 == 0 then
pUnit:RegisterEvent('spell0_22994', 1, 1)
end
if choix_sorts_22994 == 1 then
pUnit:RegisterEvent('spell1_22994', 1, 1)
end
if choix_sorts_22994 == 2 then
pUnit:RegisterEvent('spell2_22994', 1, 1)
end
if choix_sorts_22994 == 3 then
pUnit:RegisterEvent('spell3_22994', 1, 1)
end
if choix_sorts_22994 == 4 then
pUnit:RegisterEvent('spell4_22994', 1, 1)
end
if choix_sorts_22994 == 5 then
pUnit:RegisterEvent('spell5_22994', 1, 1)
end
end

function mob22994_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22994', math.random(1500, 3000), 1)
end

function mob22994_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22994_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22994_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22994, 1, 'mob22994_Action')
RegisterUnitEvent(22994, 2, 'mob22994_Leave')
RegisterUnitEvent(22994, 3, 'mob22994_Kill')
RegisterUnitEvent(22994, 4, 'mob22994_Die')
